home *** CD-ROM | disk | FTP | other *** search
/ Network Support Library / RoseWare - Network Support Library.iso / apidev / ndr2.exe / NETQ.ASM < prev    next >
Assembly Source File  |  1993-09-02  |  2KB  |  54 lines

  1. /****************************************************************************
  2. Those interested in subscribing should contact RoseWare via:
  3.  
  4. CompuServe:    76711,110
  5. Internet:      76711.110@compuserve.com
  6. Phone:         (703) 799-2509
  7. Fax:           (703) 799-8041
  8. BBS:           (703) 799-2536
  9. US Mail:       P.O. Box 257
  10.                Mount Vernon, VA  22121-0257
  11.  
  12. Also see the file SUBSCRIB.TXT in this ZIP file...
  13.  
  14. ****************************************************************************/
  15.  
  16. Contents:
  17.  
  18. Brett Warthen's code to open the NETQ: device.  According to Brett, "There 
  19. seems to be a problem with some versions of the NetWare shells, and most 
  20. definitely with the VLMs, where you have to make your current drive a 
  21. network drive in order to open NETQ.
  22.  
  23. You need to use a NetWare specific API call...Int 21h, AX=E900h, DX=drive #
  24. (A=0, B=1, etc)...and return if bit 0 or 1 is set, then it is a network
  25. drive.
  26.  
  27. Here's some code that I'm using for this purpose...
  28.  
  29.    mov  ah,19h
  30.    int  21h
  31.    push ax           ; push current drive # on stack
  32.  
  33.    xor  dx,dx        ; start with drive A
  34. @@:
  35.    mov  ax,0E900h
  36.    int  21h
  37.    and  ah,3
  38.    jnz  @F           ; got it
  39.    inc  dx
  40.    cmp  dx,26
  41.    jae  @F           ; we failed...this program doesn't handle this condition
  42.    jmp  @B
  43.  
  44. @@:
  45.    mov  ah,0Eh       ; DX contains first network drive
  46.    int  21h          ;  ...make it current
  47.  
  48. ; Open NETQ here
  49.  
  50.    pop  dx           ; restore current drive...we saved on stack
  51.    mov  ah,0Eh
  52.    int  21h
  53.  
  54.